<template>
	<view>
		<view>
			<uni-view data-v-cf183850="" class="cu-bar search bg-white">
				<uni-view data-v-cf183850="" class="search-form round">
					<uni-text data-v-cf183850="" class="cuIcon-search"><span></span></uni-text>
					<uni-input data-v-cf183850="">
						<div class="uni-input-wrapper">
							<div class="uni-input-placeholder input-placeholder" data-v-cf183850=""></div>
							<!---->
							<form action="" class="uni-input-form">
								<input maxlength="140" step="" enterkeyhint="search" v-model="key"
									autocomplete="off" type="search" class="uni-input-input" >
							</form>
						</div>
					</uni-input>
				</uni-view>
				<uni-view data-v-cf183850="" class="action">
					<uni-button data-v-cf183850="" class="cu-btn bg-green shadow-blur round" @click="goSearch">搜索</uni-button>
				</uni-view>
			</uni-view>
		</view>
		<view>
			<uni-view data-v-85e0946e="" class="padding-sm flex flex-wrap">
				<uni-view data-v-85e0946e="" class="padding-xs">
					<uni-view data-v-85e0946e="" class="cu-tag line-red">脑白金</uni-view>
				</uni-view>
				<uni-view data-v-85e0946e="" class="padding-xs">
					<uni-view data-v-85e0946e="" class="cu-tag line-orange">六个核桃</uni-view>
				</uni-view>
				<uni-view data-v-85e0946e="" class="padding-xs">
					<uni-view data-v-85e0946e="" class="cu-tag line-yellow">猴头菇</uni-view>
				</uni-view>
				<uni-view data-v-85e0946e="" class="padding-xs">
					<uni-view data-v-85e0946e="" class="cu-tag line-olive">加湿器</uni-view>
				</uni-view>
				<uni-view data-v-85e0946e="" class="padding-xs">
					<uni-view data-v-85e0946e="" class="cu-tag line-green">空气净化器</uni-view>
				</uni-view>
				<uni-view data-v-85e0946e="" class="padding-xs">
					<uni-view data-v-85e0946e="" class="cu-tag line-cyan">创口贴</uni-view>
				</uni-view>
				<uni-view data-v-85e0946e="" class="padding-xs">
					<uni-view data-v-85e0946e="" class="cu-tag line-blue">板蓝根</uni-view>
				</uni-view>
			</uni-view>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(option) {
			if(option.keyword){
				this.$req.searchByKeyWords(option.keyword,0,3).then(res=>{
					console.log(res)
				})
			}
		},
		data() {
			return {
				key:""
			}
		},
		methods: {
			goSearch(){
				this.$req.searchByKeyWords(this.key,0,3).then(res=>{
					console.log(res)
				})
				
			}
		}
	}
</script>

<style>

</style>
